#ifndef WEBHANDLER_H
#define WEBHANDLER_H

#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>

class WebHandler: public QTcpServer
{
    Q_OBJECT
public:
    static WebHandler* get_instance();

    void start(quint16 port);

private:
    explicit WebHandler(QObject *parent = nullptr);
    ~WebHandler();

    void incomingConnection(qintptr socketDescriptor) override;

signals:
    void user_up(QString user_id);
    void user_down(QString user_id);
};

#endif // WEBHANDLER_H
